using System.Collections.Generic;
using Verse;

namespace RimWorld;

public class IncidentWorker_ResourcePodCrash : IncidentWorker
{
	protected override bool TryExecuteWorker(IncidentParms parms)
	{
		Map map = (Map)parms.target;
		List<Thing> things = ThingSetMakerDefOf.ResourcePod.root.Generate();
		IntVec3 intVec = DropCellFinder.RandomDropSpot(map);
		DropPodUtility.DropThingsNear(intVec, map, things, 110, canInstaDropDuringInit: false, leaveSlag: true);
		SendStandardLetter("LetterLabelCargoPodCrash".Translate(), "CargoPodCrash".Translate(), LetterDefOf.PositiveEvent, parms, new TargetInfo(intVec, map));
		return true;
	}
}
